# coding=utf-8
class FunctionObject(object):
    def __init__(self, code_object):
        self.func_code = code_object
        self.func_name = code_object.co_name
        self.flags = code_object.flag
        self.globals = {}
        self.defaults = None  # 默认参数

    def __str__(self):
        return self.func_name


class MethodObject(object):
    def __init__(self, func, owner):
        self.func = func
        self.owner = owner
